﻿CREATE PROCEDURE [dbo].[utl_AssignPermissions]
@Environment VARCHAR (10)
AS
BEGIN
	--#Developer table must be filled prior to calling this proc
	if @Environment in ('DEV', 'TEST')
	begin
		EXECUTE [dbo].[utl_AssignRoles]
	end
	
	EXECUTE [dbo].[utl_AssignExecPermissions]
	
	EXECUTE [dbo].[utl_AssignSelectPermissions]
	
	IF (OBJECT_ID('tempdb..#Developer') IS NOT NULL)
		DROP TABLE #Developer
END

